package main

import (
	"fmt"
	"net"
	"time"
)

func main() {
	conn, err := net.Dial("udp", "127.0.0.1:9999")

	if err != nil {
		fmt.Println(err)
		return
	}

	conn.Write([]byte(time.Now().Format("2006-01-02 15:04:05")))

	ctx := make([]byte, 1024)
	n, _ := conn.Read(ctx)
	fmt.Println(string(ctx[:n]))

	conn.Close()

}
